#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "cabinetclient.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

Q_SIGNALS:
    void download_default_dir_changed();

public slots:
    void slt_clientLogin(QString client_id, QString server);
    void slt_statusChange(QString msg);
    void slt_task_start(QJsonObject task);
    void slt_task_done(QJsonObject task, bool result, QString msg);

private:
    Ui::MainWindow *ui;

    bool m_useDefaultDownloadDir = false;
    QString m_downloadDir;

    // QWidget interface
protected:
    virtual void closeEvent(QCloseEvent *event) override;
};

#endif // MAINWINDOW_H
